Repository navigation
fix: drop unused libpq-dev to restore the automation image build - #546
Conversation
python:3.12-slim-trixie was republished with libssl3t64 3.5.7-1~deb13u3, newer than the pinned Debian snapshot, so installing libpq-dev failed: the snapshot's libssl-dev requires libssl3t64 3.5.7-1~deb13u2 exactly. - Drop libpq-dev. Nothing uses libpq: the service connects with asyncpg and the migrations with pg8000, and the image has no compiler that could use the headers. - Read security updates from trixie-security, the suite for this Debian 13 image, instead of bookworm-security.
|
Warning Your comment is too long (maximum is 65536 characters), so the coverage report was not added. See the job log for how to reduce it. |
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Scope. The change belongs here: containers/Dockerfile is owned by this repository (per AGENTS.md repository structure), and it fixes a build regression in this repo's own automation image.
What I verified on the current head (9663964)
- The diff is exactly the three intended edits:
libpq-devdropped from the install line, the security suite changed frombookworm-securitytotrixie-security, and the step comment updated. No unrelated changes. libpq-dev/libpqis not used anywhere in the repo. The service connects viaasyncpgand migrations viapg8000(pyproject.toml,openhands/automation/db.py,migrations/env.py); nopsycopg/libpqdependency exists inuv.lock, and the runtime image installs no compiler. Dropping it removes only thelibssl-devpull-in, not a runtime library (libpq5was only present as a dependency oflibpq-dev).trixie-securityis the correct suite for this Debian 13 (trixie) base image; the previousbookworm-securitywas the Debian 12 suite. Both suites exist at the pinned snapshot, and the actual trixie-security snapshot suite directory andReleasefile resolve with HTTP 200, so theapt-get updatestep will succeed.gitand its dependencies still install, and the base image's OpenSSL is retained (apt-get upgrade, not downgrade).- CI on this exact head is green, including Build and Push Automation Image (the workflow this PR repairs), plus
unit-tests,backend, andpr-title. - Focused local tests pass:
tests/test_update_debian_snapshot.py,tests/test_migration_history.py,tests/test_db.py(35 passed).
Note (non-blocking). The PR correctly documents that the python:3.12-slim-trixie base tag still floats while the snapshot is held at least seven days old, so a future base-image republish can reintroduce the same class of conflict (e.g. git -> perl -> perl-base). Pinning the base image by digest alongside the weekly snapshot update would close that; it is reasonably deferred as follow-up rather than a merge blocker.
✅ APPROVED
|
🚀 Released in 1.17.0. |
Why
Build and Push Automation Imagehas failed on every build since 2026-10-02 03:18 UTC, starting with the push tomainfor #541 and then on the release PR #545, so no automation image can be built or released:containers/Dockerfilestarts from the floatingpython:3.12-slim-trixietag but installs packages from the Debian snapshot pinned in #513 (20260913T000000Z). On 2026-10-01 the tag was republished (sha256:dddfd7e…) withlibssl3t64 3.5.7-1~deb13u3installed, from the Debian security update of 2026-09-30. The snapshot only haslibssl-dev 3.5.7-1~deb13u2, which needslibssl3t64at exactly that version, and apt will not downgrade the one in the base image.libpq-devis what pullslibssl-devin. The builds before it usedsha256:f77ac9e…, which shipsdeb13u2.Two things in that step are wrong:
libpq-devis not used. The service connects withasyncpgand the migrations withpg8000; neither links against libpq, nothing inuv.lockdoes, and the image has no compiler that could use the headers. It has been in the Dockerfile since the code moved here in Migrate automation source code from deploy repo #3.bookworm-security, Debian 12's suite, in a Debian 13 image. The SDK agent-server image this step follows usestrixie-security. As it is, the image gets no trixie security fixes from the snapshot, and moving the snapshot forward would not have fixed this build:libssl-dev 3.5.7-1~deb13u3is only intrixie-security.Summary
git.libpq-dev, and with itlibssl-dev, is no longer installed.trixie-security. At the pinned snapshot this changes no installed package.The image keeps the base image's OpenSSL (
3.5.7-1~deb13u3); nothing is downgraded.Not in this PR: the base image tag still floats while the snapshot is kept at least seven days old, so a later base image can conflict the same way. For example,
gitneedsperl, which requiresperl-baseat its exact version, andperl-basecomes with the base image. Pinning the base image by digest and moving it with the weekly snapshot update would close that.How to Test
All builds use
docker build --platform linux/amd64 --pull --no-cache -f containers/Dockerfile ., which pullspython:3.12-slim-trixie@sha256:dddfd7e…, the image CI fails on.main: fails with the error above.docker buildx build --check: no warnings.libssl3t64andopensslare3.5.7-1~deb13u3;libpq5,libpq-devandlibssl-devare not installed.git --version:2.47.3.ddtrace-runworks. The container runs asautomation(42420).postgres:16-alpine):alembic upgrade head(pg8000) migrates an empty database to029.asyncpgquery readsalembic_version.AUTOMATION_DB_HOSTpointing at it, starts, andGET /healthreturns200 {"status":"ok"}with no errors in the log.AUTOMATION_DB_URL=sqlite+aiosqlite:////tmp/automations.db, the same start and/healthcheck pass.